;(function(){
var br={};
br['35']='266,A　阿斯顿马丁DB9,582,A　阿斯顿马丁DBS,923,R　Rapide,822,V　V12 Vantage';
br['33']='370,A　奥迪A3,692,A　奥迪A4L,538,A　奥迪A5,18,A　奥迪A6L,146,A　奥迪A8,812,A　奥迪Q5,412,A　奥迪Q7,511,A　奥迪R8,148,A　奥迪TT';
br['15']='373,B　宝马1系,66,B　宝马3系,317,B　宝马3系(进口),65,B　宝马5系,202,B　宝马5系(进口),270,B　宝马6系,153,B　宝马7系,2196,B　宝马M系,675,B　宝马X1,271,B　宝马X3,159,B　宝马X5,587,B　宝马X6,161,B　宝马Z4';
br['40']='168,B　Boxster,162,B　保时捷911,415,C　Cayman,172,K　卡宴,703,P　Panamera';
br['27']='852,Q　骑士S12,2126,Y　域胜007';
br['36']='2197,B　奔驰AMG级,52,B　奔驰A级,398,B　奔驰B级,365,B　奔驰CLS,683,B　奔驰CL级,588,B　奔驰C级,56,B　奔驰C级(进口),197,B　奔驰E级,450,B　奔驰E级(进口),595,B　奔驰GLK级,467,B　奔驰GL级,60,B　奔驰G级,57,B　奔驰ML级,469,B　奔驰R级,267,B　奔驰SLK,237,B　奔驰SL级,59,B　奔驰S级,2005,S　Sprinter,2084,W　威霆,2034,W　唯雅诺,300,W　唯雅诺(进口)';
br['95']='632,B　奔腾B50,466,B　奔腾B70';
br['14']='880,A　奥德赛,314,B　本田CR-V,81,F　飞度,694,F　锋范,2168,G　歌诗图,859,S　思铂睿,135,S　思域,78,Y　雅阁';
br['75']='579,B　比亚迪F0,407,B　比亚迪F3,940,B　比亚迪F3R,540,B　比亚迪F6,927,B　比亚迪G3,2085,B　比亚迪L3,798,B　比亚迪M6,489,B　比亚迪S8';
br['13']='688,B　标致207,640,B　标致207(进口),724,B　标致3008,99,B　标致307,689,B　标致308(进口),185,B　标致407,987,B　标致408,186,B　标致607';
br['38']='592,A　昂科雷,166,B　别克GL8,164,J　君威,834,J　君越,875,K　凯越,525,L　林荫大道,982,Y　英朗';
br['39']='901,M　慕尚,305,O　欧陆,306,Y　雅致';
br['37']='390,W　威航';
br['79']='76,A　爱迪尔';
br['76']='484,B　奔奔i,2046,B　奔奔LOVE,2045,B　奔奔MINI,2119,C　长安CX20,1008,C　长安CX30,520,J　杰勋,705,Y　悦翔,590,Z　志翔';
br['77']='491,C　长城精灵,395,H　哈弗H3,2027,H　哈弗H5,535,H　哈弗M1,2001,H　哈弗M2,536,J　嘉誉,493,K　酷熊,624,L　凌傲,2090,T　腾翼C30,2200,T　腾翼V80,492,X　炫丽';
br['78']='569,L　猎豹CS6,706,L　猎豹飞腾,961,L　猎豹黑金刚,962,L　猎豹奇兵,377,P　帕杰罗';
br['111']='939,Y　野马F99';
br['1']='633,B　宝来,700,D　大众CC,430,D　大众EOS,871,G　高尔夫,224,H　辉腾,210,J　甲壳虫,16,J　捷达,614,L　朗逸,631,M　Multivan,496,M　迈腾,368,P　PASSAT,826,P　PASSAT新领驭,145,P　POLO,669,S　Scirocco尚酷,149,S　桑塔纳,207,S　桑塔纳志俊,442,S　速腾,557,T　Tiguan,333,T　途安,874,T　途观,82,T　途锐,905,Y　一汽-大众CC';
br['41']='574,K　凯领,575,K　酷搏,602,K　酷威';
br['105']='799,D　帝豪EC7,800,D　帝豪EC7-RV,801,D　帝豪EC8';
br['32']='561,A　奥丁,554,J　景逸,541,L　菱智,951,S　帅客,562,Y　御轩';
br['113']='1006,F　风神H30,790,F　风神S30';
br['81']='606,V　V3菱悦,2269,X　希旺';
br['42']='889,4　458 Italia,676,C　California,459,F　法拉利599,367,F　法拉利612';
br['11']='542,B　博悦,544,L　领雅,543,P　朋多';
br['3']='2107,A　埃尔法,513,F　FJ 酷路泽,770,F　丰田RAV4,771,H　汉兰达,964,H　红杉,109,H　花冠,882,H　皇冠,526,K　卡罗拉,110,K　凯美瑞,45,L　兰德酷路泽,46,P　普拉多,334,P　普拉多(进口),371,P　普锐斯,107,P　普瑞维亚,375,R　锐志,111,W　威驰,505,Y　雅力士';
br['8']='364,F　福克斯,659,J　嘉年华,498,M　麦柯斯,577,M　蒙迪欧-致胜,684,R　锐界';
br['96']='626,M　蒙派克,661,M　迷迪';
br['112']='980,S　Savana';
br['82']='2141,C　传祺';
br['24']='67,L　路宝,2229,L　路尊大霸王,392,S　赛豹III,68,S　赛马';
br['86']='470,F　福美来,47,H　海福星,527,H　海马3,823,H　海马骑士,855,H　海马王子,696,H　欢动,844,P　普力马,824,Q　丘比特';
br['43']='38,H　悍马H2,379,H　悍马H3';
br['91']='428,H　红旗盛世';
br['87']='2108,H　华泰B11,477,S　圣达菲,290,T　特拉卡';
br['97']='2212,A　翱龙CUV,673,Q　旗胜CUV,2211,T　挑战者SUV';
br['46']='521,D　大切诺基(进口),121,M　牧马人,503,Z　指挥官,504,Z　指南者';
br['108']='2114,A　奥轩,1015,S　帅豹,864,S　帅舰';
br['104']='2192,Q　全球鹰GX2,608,X　熊猫,474,Y　远景,409,Z　自由舰';
br['84']='567,B　宾悦,616,H　和悦,816,H　和悦RS,553,R　瑞风,572,R　瑞鹰,660,T　同悦,617,T　同悦RS,828,Y　悦悦';
br['119']='2228,Y　驭胜';
br['44']='589,J　捷豹XF,178,J　捷豹XJ,456,J　捷豹XK';
br['83']='548,G　阁瑞斯';
br['101']='796,Y　优派,2083,Y　优胜,495,Y　优雅,846,Y　优优';
br['47']='311,K　凯迪拉克CTS(进口),49,K　凯迪拉克SRX,426,K　凯迪拉克XLR,462,K　凯雷德ESCALADE,488,S　SLS赛威';
br['100']='732,K　柯尼赛格CCXR';
br['9']='380,P　PT 漫步者';
br['48']='354,G　Gallardo,727,R　Reventon';
br['54']='836,G　古思特,265,H　幻影';
br['52']='403,L　雷克萨斯ES,261,L　雷克萨斯GS,112,L　雷克萨斯GX,201,L　雷克萨斯IS,341,L　雷克萨斯LS,352,L　雷克萨斯LX,351,L　雷克萨斯RX';
br['10']='199,F　风景,686,K　科雷傲,188,L　拉古那';
br['80']='597,L　力帆320,443,L　力帆520,596,L　力帆620';
br['50']='272,L　莲花Elise';
br['89']='583,J　竞速,691,J　竞悦,928,L　莲花L3';
br['51']='869,L　林肯MKS,794,L　林肯MKT,758,L　林肯MKX,793,L　林肯MKZ,95,L　领航员';
br['53']='872,A　奥拓,75,B　北斗星,500,C　超级维特拉,508,J　吉姆尼,892,K　凯泽西,547,L　浪迪,432,L　利亚纳,94,L　羚羊,529,T　天语 SX4,2242,T　天语·尚悦,362,Y　雨燕';
br['88']='468,F　风尚,501,L　陆风X6,833,L　陆风X8,635,L　陆风X9';
br['49']='802,D　第四代发现,69,L　揽胜,850,L　揽胜运动版,77,S　神行者2,256,W　卫士';
br['20']='555,M　MG3SW,835,M　MG6,531,M　MG7,533,M　MGTF';
br['56']='209,M　MINI,749,M　MINI CLUBMAN,750,M　MINI COUNTRYMAN';
br['58']='433,M　马自达2,641,M　马自达2劲翔,363,M　马自达3,584,M　马自达3(进口),578,M　马自达5,22,M　马自达6,2118,M　马自达8,658,M　马自达CX-7,672,M　马自达MX-5,655,R　睿翼';
br['57']='903,G　GranCabrio,551,G　GranTurismo,289,Z　总裁';
br['55']='389,M　迈巴赫';
br['60']='524,O　讴歌MDX,464,O　讴歌RL,479,O　讴歌TL';
br['59']='670,A　安德拉,381,S　赛飞利,182,W　威达,348,Y　雅特';
br['26']='83,D　东方之子,837,F　风云2,518,Q　奇瑞A1,530,Q　奇瑞A3,434,Q　奇瑞A5,87,Q　奇瑞QQ 3,478,Q　奇瑞QQ 6,612,Q　奇瑞QQme,996,Q　旗云1,2178,Q　旗云2,2180,Q　旗云3,396,R　瑞虎';
br['62']='591,B　霸锐,813,F　福瑞迪,284,J　嘉华,1010,K　凯尊,502,Q　起亚VQ,454,R　RIO锐欧,413,S　赛拉图,565,S　狮跑,1016,S　速迈,281,S　索兰托,453,X　新佳乐,876,X　秀尔,298,Y　远舰,2137,Z　智跑';
br['63']='522,L　骊威,2086,M　玛驰,53,P　帕拉丁,656,Q　奇骏,425,Q　骐达,436,R　日产GT-R,2113,R　日产NV200,634,T　天籁,564,X　逍客,448,X　轩逸,64,Y　阳光,355,Y　颐达';
br['19']='2062,R　荣威350,537,R　荣威550,482,R　荣威750';
br['103']='797,R　瑞麒G5,804,R　瑞麒M1,853,R　瑞麒M5,854,R　瑞麒X1';
br['45']='620,s　smart fortwo';
br['68']='1018,A　ASX劲炫,483,G　戈蓝,325,G　格蓝迪,668,J　君阁,369,L　LANCER,458,L　蓝瑟,486,O　OUTLANDER EX,580,P　帕杰罗(进口),873,S　三菱翼神';
br['66']='599,S　世爵C8';
br['90']='345,S　双环SCEO,506,X　小贵族';
br['69']='455,A　爱腾,139,L　雷斯特Ⅱ,516,L　路帝,485,X　享御';
br['65']='286,A　傲虎,414,C　驰鹏,287,L　力狮,285,S　森林人,283,Y　翼豹';
br['67']='772,H　昊锐,382,J　晶锐,519,M　明锐';
br['102']='2227,W　威麟H3,2172,W　威麟H5,909,W　威麟V5,613,W　威麟X5';
br['99']='725,W　威兹曼GT';
br['70']='494,W　沃尔沃C30,406,W　沃尔沃C70,463,W　沃尔沃S40,693,W　沃尔沃S80L,585,W　沃尔沃XC60,177,W　沃尔沃XC90';
br['114']='2139,W　五菱宏光';
br['7']='101,X　夏利';
br['12']='2117,H　H-1辉翼,594,L　劳恩斯,756,L　劳恩斯-酷派,866,M　MOINCA名驭,2115,R　瑞纳,690,S　SONATA·领翔,358,T　途胜,510,W　维拉克斯,814,X　现代i30,1007,X　现代ix35,127,X　新胜达,255,Y　雅科仕,431,Y　雅绅特,446,Y　雅尊,51,Y　伊兰特,586,Y　悦动';
br['71']='397,J　景程,657,K　科鲁兹,546,K　科帕奇,420,L　乐骋,155,L　乐驰,439,L　乐风,163,S　赛欧,808,S　斯帕可SPARK';
br['72']='98,A　爱丽舍,232,B　毕加索,473,D　大C4毕加索,388,K　凯旋,639,S　世嘉,476,X　雪铁龙C2,480,X　雪铁龙C4,792,X　雪铁龙C5';
br['110']='913,S　森雅M80,2131,S　森雅S80,106,W　威乐,444,W　威志,879,W　威志V2,878,X　夏利N5';
br['73']='605,Y　英菲尼迪EX,122,Y　英菲尼迪FX,383,Y　英菲尼迪G系,581,Y　英菲尼迪M系,416,Y　英菲尼迪QX';
br['106']='447,J　金刚,609,J　金鹰,2111,Y　英伦SC5-RV,2051,Y　英伦SC7,841,Y　英伦TX4';
br['93']='424,F　飞碟UFO';
br['22']='411,Z　中华骏捷,860,Z　中华骏捷Cross,523,Z　中华骏捷FRV,825,Z　中华骏捷FSV,490,Z　中华酷宝,130,Z　中华尊驰';
br['74']='2081,W　无限V5,2143,W　无限V7';
br['94']='2230,J　江南奥拓,708,L　朗悦,558,Z　众泰2008,663,Z　众泰5008/乐睿';
var cartabsHtml = '<div class="car-logo"><a href="http://www.autohome.com.cn/"></a></div><div class="car-search"><form action="http://sou.autohome.com.cn/search.aspx" method="get" id="carsearch-form"><input type="text" class="car-keyword" autocomplete="off" name="q" id="car-q"/><button type="submit"/>汽车搜索</button></form><form id="carsselect-form" action="" method="get"><select id="car-brand"><option value="0">选择品牌</option><option value="35">A　阿斯顿·马丁</option><option value="33">A　奥迪</option><option value="15">B　宝马</option><option value="40">B　保时捷</option><option value="27">B　北汽</option><option value="36">B　奔驰</option><option value="95">B　奔腾</option><option value="14">B　本田</option><option value="75">B　比亚迪</option><option value="13">B　标致</option><option value="38">B　别克</option><option value="39">B　宾利</option><option value="37">B　布嘉迪</option><option value="79">C　昌河</option><option value="76">C　长安</option><option value="77">C　长城</option><option value="78">C　长丰</option><option value="111">C　川汽野马</option><option value="1">D　大众</option><option value="41">D　道奇</option><option value="105">D　帝豪</option><option value="32">D　东风</option><option value="113">D　东风风神</option><option value="81">D　东南</option><option value="42">F　法拉利</option><option value="11">F　菲亚特</option><option value="3">F　丰田</option><option value="8">F　福特</option><option value="96">F　福田</option><option value="112">G　GMC</option><option value="82">G　广汽</option><option value="24">H　哈飞</option><option value="86">H　海马</option><option value="43">H　悍马</option><option value="91">H　红旗</option><option value="87">H　华泰</option><option value="97">H　黄海</option><option value="46">J　Jeep吉普</option><option value="108">J　吉奥</option><option value="104">J　吉利全球鹰</option><option value="84">J　江淮</option><option value="119">J　江铃</option><option value="44">J　捷豹</option><option value="83">J　金杯</option><option value="101">K　开瑞</option><option value="47">K　凯迪拉克</option><option value="100">K　柯尼赛格</option><option value="9">K　克莱斯勒</option><option value="48">L　兰博基尼</option><option value="54">L　劳斯莱斯</option><option value="52">L　雷克萨斯</option><option value="10">L　雷诺</option><option value="80">L　力帆</option><option value="50">L　莲花</option><option value="89">L　莲花汽车</option><option value="51">L　林肯</option><option value="53">L　铃木</option><option value="88">L　陆风</option><option value="49">L　路虎</option><option value="20">M　MG</option><option value="56">M　MINI</option><option value="58">M　马自达</option><option value="57">M　玛莎拉蒂</option><option value="55">M　迈巴赫</option><option value="60">O　讴歌</option><option value="59">O　欧宝</option><option value="26">Q　奇瑞</option><option value="62">Q　起亚</option><option value="63">R　日产</option><option value="19">R　荣威</option><option value="103">R　瑞麒</option><option value="45">S　smart</option><option value="68">S　三菱</option><option value="66">S　世爵</option><option value="90">S　双环</option><option value="69">S　双龙</option><option value="65">S　斯巴鲁</option><option value="67">S　斯柯达</option><option value="102">W　威麟</option><option value="99">W　威兹曼</option><option value="70">W　沃尔沃</option><option value="114">W　五菱汽车</option><option value="7">X　夏利</option><option value="12">X　现代</option><option value="71">X　雪佛兰</option><option value="72">X　雪铁龙</option><option value="110">Y　一汽</option><option value="73">Y　英菲尼迪</option><option value="106">Y　英伦</option><option value="93">Y　永源</option><option value="22">Z　中华</option><option value="74">Z　中兴</option><option value="94">Z　众泰</option></select><select id="car-series" disabled><option value="0">选择车系</option></select><button type="submit">搜车系</button></form></div><div class="car-hotkeyword"><p><a href="http://car.autohome.com.cn/CarPrice/list-0-60-0-0-0-1-1.html">5万以下</a>|<a href="http://car.autohome.com.cn/CarPrice/list-0-61-0-0-0-1-1.html">5-8万</a>|<a href="http://car.autohome.com.cn/CarPrice/list-0-62-0-0-0-1-1.html">8-10万</a>|<a href="http://car.autohome.com.cn/CarPrice/list-0-63-0-0-0-1-1.html">10-15万</a></p><p><a href="http://car.autohome.com.cn/CarPrice/list-0-64-0-0-0-1-1.html">15-20万</a>|<a href="http://car.autohome.com.cn/CarPrice/list-0-65-0-0-0-1-1.html">20-25万</a>|<a href="http://car.autohome.com.cn/CarPrice/list-0-66-0-0-0-1-1.html">25-35万</a>|<a href="http://car.autohome.com.cn/">更多价格</a></p></div>';
	_d("autocar-area").innerHTML=cartabsHtml;
	tool.creatElement({id:"car-tips"},"div",_d("wrap"));
	tool.addEvent("mousedown",function(e){
		tool.show(_d("car-tips"));
		e = e || event;
		var t = e.target||e.srcElement;
		if(!tool.isAChild(_d("car-tips"),t))
		{
		   tool.hide(_d("car-tips"));
		}
	},document);
	tool.addEvent("change",function()
	{
		var brandid = _d("car-brand").options[_d("car-brand").selectedIndex].value;
		if(brandid>0)
		{
			_d("car-series").removeAttribute("disabled");
			var seriesArr = br[brandid].split(",");
			_d("car-series").length = Math.floor(seriesArr.length/2);
			for(var i=0,max=seriesArr.length;i<max;i+=2)
			{
				 var elem = _d("car-series").options[Math.floor(i/2)];
				 elem.value = seriesArr[i];
				 elem.innerHTML = seriesArr[i+1];
			}
		}
	},_d("car-brand"));
	tool.addEvent("keyup",function(e){
		function autocarHint(a)
		{
			var oldload = window.loadSuccess;
			window.loadSuccess = function(resStr){
				var items = resStr.split(","),tipsHtml="";
				for(var i=0,max=items.length;i<max;i++)
				{
					tipsHtml+="<a onmousedown=\"javascript:_d('car-q').value='" + items[i] + "';_d('car-tips').style.display = 'none';_d('carsearch-form').submit();\" onmouseover=\"javascript:this.className='hover'\" onmouseout=\"javascript:this.className='';\">" + items[i] + "</a>";
				}
				_d('car-tips').innerHTML = tipsHtml;
				(tipsHtml)?tool.show(_d("car-tips")):tool.hide(_d("car-tips"));
			}
			tool.load("http://sou.autohome.com.cn/SmartTip.ashx?q="+escape(a)+"&d="+(+new Date()),"js",function(){
				oldload&&setTimeout(function(){
					window.loadSuccess = oldload;
				},1500);
			});
		}
		e = e || event;
		var b = e.target || e.srcElement,
		c = _d("car-tips");
		if (!b.value || !b.value.length || e.keyCode == 27 || e.keyCode == 13) c.style.display = "none";
		else if (e.keyCode == 38 || e.keyCode == 40)
		{
			if (c.style.display != "none") {
				if (e.keyCode == 38) if (c._i == -1) c._i = c.childNodes.length - 1;
				else c._i--;
				else c._i++;
				for (var a = 0; a < c.childNodes.length; a++) c.childNodes[a].className = "";
				if (c._i >= 0 && c._i < c.childNodes.length)
				{
					c.childNodes[c._i].className = "hover";
					b.value = c.childNodes[c._i].innerHTML
				} else {
					b.value = c._kw;
					c._i = -1
				}
			}
		} else {
			c._i = -1;
			c._kw = b.value;
			autocarHint(b.value);
            c.style.left = _d("car-q").getBoundingClientRect().left+document.documentElement.scrollLeft-_d("wrap").getBoundingClientRect().left + "px";
			c.style.top  = _d("car-q").getBoundingClientRect().top+document.documentElement.scrollTop-_d("wrap").getBoundingClientRect().top +_d("car-q").offsetHeight+ "px";
		}
	},_d("car-q"));
	tool.addEvent("submit",function(){
		var e = arguments[0]||event;
		var seriesid = _d("car-series").options[_d("car-series").selectedIndex].value;
		if(seriesid>0)
		{
			_d("carsselect-form").action = "http://www.autohome.com.cn/"+seriesid+"/";
		}
		else
		{
			e.preventDefault&&e.preventDefault()&&e.stopPropagation();
			return false;
		}
	},_d("carsselect-form"));
	tool.addEvent("submit",function(){
		if(_d("car-q").value==="")
		{
			_d("carsearch-form").action = "http://car.autohome.com.cn/";
			setTimeout(function(){
				_d("carsearch-form").action = "http://sou.autohome.com.cn/search.aspx";
			},2000);
		}
	},_d("carsearch-form"));
})()